﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace UniRx
{
	// Token: 0x02000405 RID: 1029
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct CollectionAddEvent<T> : IEquatable<CollectionAddEvent<T>>
	{
		// Token: 0x06001507 RID: 5383 RVA: 0x0005E801 File Offset: 0x0005CC01
		public CollectionAddEvent(int index, T value)
		{
			this = default(CollectionAddEvent<T>);
			this.Index = index;
			this.Value = value;
		}

		// Token: 0x1700018A RID: 394
		// (get) Token: 0x06001508 RID: 5384 RVA: 0x0005E818 File Offset: 0x0005CC18
		// (set) Token: 0x06001509 RID: 5385 RVA: 0x0005E820 File Offset: 0x0005CC20
		public int Index { get; private set; }

		// Token: 0x1700018B RID: 395
		// (get) Token: 0x0600150A RID: 5386 RVA: 0x0005E829 File Offset: 0x0005CC29
		// (set) Token: 0x0600150B RID: 5387 RVA: 0x0005E831 File Offset: 0x0005CC31
		public T Value { get; private set; }

		// Token: 0x0600150C RID: 5388 RVA: 0x0005E83A File Offset: 0x0005CC3A
		public override string ToString()
		{
			return string.Format("Index:{0} Value:{1}", this.Index, this.Value);
		}

		// Token: 0x0600150D RID: 5389 RVA: 0x0005E85C File Offset: 0x0005CC5C
		public override int GetHashCode()
		{
			return this.Index.GetHashCode() ^ EqualityComparer<T>.Default.GetHashCode(this.Value) << 2;
		}

		// Token: 0x0600150E RID: 5390 RVA: 0x0005E890 File Offset: 0x0005CC90
		public bool Equals(CollectionAddEvent<T> other)
		{
			return this.Index.Equals(other.Index) && EqualityComparer<T>.Default.Equals(this.Value, other.Value);
		}
	}
}
